﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Watch
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private void 关闭ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
        private string hour;
        private string minute;
        private string second;
        private void timer1_Tick(object sender, EventArgs e)
        {
            DateTime nowDate = DateTime.Now;
            hour = nowDate.Hour.ToString() + ":";
            if (hour.Length == 2)
            {
                hour = "0" + hour;
            }
            minute = nowDate.Minute.ToString() + ":";
            if (minute.Length == 2)
            {
                minute = "0" + minute;
            }
            second = nowDate.Second.ToString() + ".";
            if (second.Length == 2)
            {
                second = "0" + second;
            }
            notifyIcon1.ShowBalloonTip(1000, "时间", hour + minute + second + nowDate.Millisecond.ToString(), ToolTipIcon.Info);
        }

        private void FormMain_Load(object sender, EventArgs e)
        {

        }
    }
}
